<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H+ 后台主题UI框架 - 空白页</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico"> 
    <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.css?v=4.4.0" rel="stylesheet">
     <!-- jqgrid-->
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
</head>

<body style="color:#333;padding:3px;" class="x_sorll">
    <!-- 标题 -->
    <div class="page-heade">
      <h2 class="title_color text-center">费用汇总表</h2>
    </div>
    <!-- 标题 -->
    <div >
   <form action="#" method="post" class="form-inline" id="form_check">
      <table class="row-margin-top tab-content table-bordered table" border="1">
          <tr>
            <td>
                <div class="form-group">
                     <label for="" class="form-label">一级考核期：</label>
                        <select name="cainian" id="cainian" style="min-width: 140px;width: 140px" class="form-control">
                            {volist name="cainian" id="se"}
                              {if $data.cainian==$se.id}
                              <option value="{$se.id}" selected>{$se.title}</option>
                              {else/}
                                <option value="{$se.id}">{$se.title}</option>
                              {/if}
                            {/volist}
                     </select>
                      <select name="kaohe1" id="kaohe1" style="min-width: 140px;width: 140px" class="form-control">
                            {volist name="kaohe1" id="se"}
                            {if $data.kaohe1==$se.id}
                             <option pid="{$se.cid}" value="{$se.id}" selected>{$se.title}</option>
                            
                            {else/}
                            <option pid="{$se.cid}" value="{$se.id}">{$se.title}</option>
                            {/if}
                            {/volist}
                     </select>
               </div>
                 <button class="btn btn-info query" >查询</button>
                 <button class="btn btn-info LendExcel" type="button" onclick="daochu({$data.kaohe1})">导出费用汇总表</button>
                 <span style="float: right;margin-top: 10px">单位：元</span>
            </td>
          </tr>
      </table>
    
      <table class="table table-striped row-margin-top table-bordered text-right bud_hei">
          <tr class="info">
            <th class="text-center">项目</th>
            <th class="text-center">说明</th>
            <th class="text-center">销售费用</th>
            <th class="text-center">合计</th>
          </tr>
          <tr>
			<td class="text-center">暂估</td>
			<td class="text-left">来自 <span>"暂估明细表"</span></td>
			<td class="ObjectNum">{$zanguzong}</td>
			<td class="ObjectNum">{$zanguzong}</td>
          </tr>
          <tr>
			<td class="text-center">结案</td>
			<td class="text-left">来自 <span>"结案明细表"</span></td>
			<td class="ObjectNum">{$jieanzong}</td>
			<td class="ObjectNum">{$jieanzong}</td>
          </tr>
         <tr>
			<td class="text-center">补货x1</td>
			<td class="text-left">来自 <span>"补货明细表"</span><br>按核清价暂估</td>
			<td class="ObjectNum">{$buzangu}</td>
			<td class="ObjectNum">{$buzangu}</td>
          </tr>
          <tr>
			<td class="text-center">补货x2</td>
			<td class="text-left">来自 <span>"补货明细表"</span><br>按当月实际成本价</td>
			<td class="ObjectNum">{$buhuo}</td>
			<td class="ObjectNum">{$buhuo}</td>
          </tr>
         <!--  <tr>
			<td class="text-center">补货拉环x1</td>
			<td class="text-left">来自 <span>"补货明细表(拉环)"</span><br>按核清价暂估</td>
			<td class="ObjectNum">-</td>
			<td class="ObjectNum">0</td>
          </tr>
           <tr>
			<td class="text-center">补货拉环x2</td>
			<td class="text-left">来自 <span>"补货明细表(拉环)"</span><br>按当月实际成本价</td>
			<td class="ObjectNum">-</td>
			<td class="ObjectNum">0</td>
          </tr>-->
         <tfoot>
            <tr class="font-bold">
              <td colspan="2">合计</td>
              <td class="ObjectNum">{$zongji}</td>
              <td class="ObjectNum">{$zongji}</td>
          </tr>
         </tfoot>
      </table>
</form>
    </div>
    <!-- 全局js -->
    <script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
     <script src="__STATIC__/layout/js/common.js"></script>
    <script>
        
                            //翻页
        $("#pagesize").change(function(){
            $("#page-go").val(1);
            $("#list-go").val($(this).val());
            document.getElementById("form_check").submit();
        })
        $("#gopage").click(function(){
             $("#page-go").val($("#page").val());
              document.getElementById("form_check").submit();
        })
        $("#page").keyup(function(){

            if(isNaN(parseInt($(this).val()))){
                $(this).val(1);
            }else{
                $(this).val(parseInt($(this).val()));
            }
            
        })
        $("#fistpage").click(function(){
              $("#page-go").val(1);
              document.getElementById("form_check").submit();
        })
        $("#check").click(function(){
              $("#page-go").val(1);
              document.getElementById("form_check").submit();
        })
        $("#clear_check").click(function(){
            $("input[type='text']").val("");
            $("select").val(0);
            $("#page-go").val(1);
            $("input[type='checkbox']").prop("checked",false);
             document.getElementById("form_check").submit();
        })
         //三级联动
    $("#cainian").change(function(){
        var cid=$("#cainian").val();
      $("#kaohe1>option[pid='"+cid+"']").show();
      $("#kaohe1>option[pid!='"+cid+"']").hide();
      $("#kaohe1>option[pid='"+cid+"']").eq(0).prop("selected",true);
   
    })
     //开启隐藏
    function hiddens(){
      var cid=$("#cainian").val();
      $("#kaohe1>option[pid='"+cid+"']").show();
      $("#kaohe1>option[pid!='"+cid+"']").hide();
   
    }
     function daochu(kaohe1){
      window.open("{:url('daochuhuizong')}?kaohe1="+kaohe1);
    }
    </script>
</body>

</html>
